﻿using System;

namespace WhileLoop
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Sum Calculator");

            Console.Write("from = ");
            int from = int.Parse(Console.ReadLine());

            Console.Write("to = ");
            int to = int.Parse(Console.ReadLine());

            int sum = 0;

            while (from <= to)
            {
                sum = sum + from;
                from = from + 1;
            }

            Console.WriteLine("Sum = " + sum);

            Console.ReadKey();
        }
    }
}
